#include <stdio.h>

int n;
int cam[110];
int spit[110];

int main() {
	scanf("%d", &n);

	for (int i=0; i<n; i++) {
		scanf("%d %d", &cam[i], &spit[i]);
	}

	int fl=0;

	for (int i=0; i<n; i++) {
		for (int j=0; j<n; j++) {
			if (cam[i]+spit[i]==cam[j] &&
				cam[j]+spit[j]==cam[i]) fl=1;
				
			if (fl) break;
		}

		if (fl) break;
	}
	
	if (fl) printf("YES\n");
	else printf("NO\n");

	return 0;
}
